<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
        #allmap{width:100%;height:500px;}
        p{margin-left:5px; font-size:14px;}
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=5zQ9nwYR2PShtg3XHWEFDp9yGAy1E6vb"></script>
    <title>个性化地图设置页</title>
</head>
<body>
<div id="allmap"></div>
<p>底图样式可通过<a href='/custom/' target="_blank">个性化在线编辑器</a>编辑获取</p>
</body>
</html>
<script type="text/javascript">
    var map = new BMap.Map('allmap');
    map.centerAndZoom(new BMap.Point(116.404269,39.916042), 12);

    map.addControl(new BMap.NavigationControl());        // 添加平移缩放控件
    map.addControl(new BMap.ScaleControl());             // 添加比例尺控件
    map.addControl(new BMap.OverviewMapControl());       //添加缩略地图控件
    map.enableScrollWheelZoom();                         //启用滚轮放大缩小
    map.disable3DBuilding();

    //个性化在线编辑器地址：http://lbsyun.baidu.com/custom/
    var styleJson =  [{
        'featureType': 'water',
        'elementType': 'all',
        'stylers': {
            'color': '#031628'
        }
    }, {
        'featureType': 'land',
        'elementType': 'geometry',
        'stylers': {
            'color': '#000102'
        }
    }, {
        'featureType': 'highway',
        'elementType': 'all',
        'stylers': {
            'visibility': 'off'
        }
    }, {
        'featureType': 'arterial',
        'elementType': 'geometry.fill',
        'stylers': {
            'color': '#000000'
        }
    }, {
        'featureType': 'arterial',
        'elementType': 'geometry.stroke',
        'stylers': {
            'color': '#0b3d51'
        }
    }, {
        'featureType': 'local',
        'elementType': 'geometry',
        'stylers': {
            'color': '#000000'
        }
    }, {
        'featureType': 'railway',
        'elementType': 'geometry.fill',
        'stylers': {
            'color': '#000000'
        }
    }, {
        'featureType': 'railway',
        'elementType': 'geometry.stroke',
        'stylers': {
            'color': '#08304b'
        }
    }, {
        'featureType': 'subway',
        'elementType': 'geometry',
        'stylers': {
            'lightness': -70
        }
    }, {
        'featureType': 'building',
        'elementType': 'geometry.fill',
        'stylers': {
            'color': '#000000'
        }
    }, {
        'featureType': 'all',
        'elementType': 'labels.text.fill',
        'stylers': {
            'color': '#857f7f'
        }
    }, {
        'featureType': 'all',
        'elementType': 'labels.text.stroke',
        'stylers': {
            'color': '#000000'
        }
    }, {
        'featureType': 'building',
        'elementType': 'geometry',
        'stylers': {
            'color': '#022338'
        }
    }, {
        'featureType': 'green',
        'elementType': 'geometry',
        'stylers': {
            'color': '#062032'
        }
    }, {
        'featureType': 'boundary',
        'elementType': 'all',
        'stylers': {
            'color': '#465b6c'
        }
    }, {
        'featureType': 'manmade',
        'elementType': 'all',
        'stylers': {
            'color': '#022338'
        }
    }, {
        'featureType': 'label',
        'elementType': 'all',
        'stylers': {
            'visibility': 'off'
        }
    }]
    map.setMapStyle({styleJson:styleJson});
</script>

